#ifndef PLOT_H
#define PLOT_H

#include <qwt_plot.h>
#include <qwt_painter.h>
#include <qwt_plot_canvas.h>
#include <qwt_plot_grid.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_layout.h>
#include <qwt_scale_widget.h>
#include <qwt_scale_draw.h>
#include <qwt_series_data.h>
#include "settings.h"
#include "qparser.h"
#include <QPixmap>
#include <QFileDialog>

class Plot : public QwtPlot
{
    Q_OBJECT
public:
        Plot(QWidget* = NULL);

signals:

public slots:
void setSettings(const Settings &);
void newSample(QList<variable>);
void newcanvasColor(QColor);
void toggleGrid(bool);
void newgridColor(QColor);
void newcurveColor(QColor);
void newcurveWidth(int);
void newbuffSize(int);
void takeSnapshot();

void newVariable();
void removeVariable(int);
void plotSelection(QList<bool>);

private:
QwtPlotGrid *d_grid;
QwtPlotCurve *d_curve;
    int d_timerId;
Settings d_settings;
    void alignScales();
    int xpos;
    QVector<QPointF> numList;
    int buffsize;
 //   QwtSeriesData<QPointF*> datapts;

    // POINTS BUFFER DATA:
    QList<QVector<QPointF> > vectorList;
    QList<QwtPlotCurve *> curveList;
    QList<bool> showCurve;
};

#endif // PLOT_H
